﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QueueTest
{
    class Program
    {
        static void Main(string[] args)
        {
            //模拟排队
            Queue queue = new Queue();  
            queue.Enqueue("伞兵一号卢本伟");
            queue.Enqueue("伞兵二号大司马"); 
            queue.Enqueue("伞兵三号大官人");
            queue.Enqueue("伞兵四号马飞飞");
            Console.WriteLine("准备跳伞：");  
            while (queue.Count != 0) 
            { 
                Console.WriteLine(queue.Dequeue() + "准备就绪！");
            }
            Console.WriteLine("我们P城见面！");
            //添加数值并依次输出
            Queue queue1 = new Queue(); 
            queue1.Enqueue("aaa");
            queue1.Enqueue("bbb"); 
            queue1.Enqueue("ccc"); 
            object[] obj = queue1.ToArray();
            foreach (var v in obj)
            { 
                Console.WriteLine(v);
            }
        }
    }
}
